from demo  import test
from lib   import *
from thing import *

@test
def numed( n = Num(0,'nums')):
  import random; random.seed(1)
  for i in range(1000): n.put(random.randint(0,100))
  return (0,100.0),(n.min,n.max)

@test
def symed(s = Sym(0,'syms')):
    for x in often([('a',10),('b',20),('c',40)],
                    max=10000,
                    item=first,weight=second):
      s.put(x)
    return (('c',{'a': 1456, 'c': 5661, 'b': 2883}),
            (s.mode,s.counts))
